package com.veo.mapper;


import com.veo.entity.Employee;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

public interface EmployeeMapper {

    @Select("select * from employee where id=#{id}")
    Employee selectEmpById(Integer id);

    @Update("update employee set lastName=#{lastName},gender=#{gender},email=#{email},d_id=#{dId} where id=#{id}")
    int updateEmp(Employee employee);

    @Delete("delete from employee where id=#{id}")
    int delEmpById(Integer id);

    @Insert("insert into employee(lastName,gender,email,d_id) values(#{lastName},#{gender},#{email},#{dId})")
    int insertEmp(Employee employee);

    @Select("select * from employee where lastName=#{lastName}")
    Employee selectByLastName(String lastName);


}
